package com.fowo.api.model.payable.product;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.NumberFormat;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 应付单商品列表 导入导出辅助模型 */
@Getter
@Setter
public class PayableProductExcelPo {

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "所属应付单")
  private String parentPayableSupplierName;

  @ExcelIgnore
  @ExcelProperty(value = "所属应付单")
  private Long parentPayable;

  @NotNull(message = "商品不能为空")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*商品")
  private String productIdName;

  @ExcelIgnore
  @ExcelProperty(value = "*商品")
  private Long productId;

  @Size(max = 500, message = "商品名称长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "商品名称")
  private String name;

  @Size(max = 50, message = "SKU长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "SKU")
  private String sku;

  @Size(max = 50, message = "计价数量长度不能超过20")
  @ExcelProperty(value = "计价数量")
  private Integer num;

  @ExcelProperty(value = "上一次价格")
  private java.math.BigDecimal lastUnitPrice;

  @Size(max = 50, message = "价格长度不能超过20")
  @NumberFormat("0.0000")
  @ExcelProperty(value = "价格")
  private java.math.BigDecimal price;

  @ExcelProperty(value = "上一次成本价")
  private java.math.BigDecimal lastCostPrice;

  @ExcelProperty(value = "成本价格")
  private java.math.BigDecimal costPrice;

  @NumberFormat("0.0000")
  @ExcelProperty(value = "主材料单价")
  private java.math.BigDecimal mainUnitPrice;

  @NumberFormat("0.0000")
  @ExcelProperty(value = "主材料克重")
  private java.math.BigDecimal gramWeight;

  @ExcelProperty(value = "主材料克重合计")
  private java.math.BigDecimal gramWeightAmount;

  @NumberFormat("0.0000")
  @ExcelProperty(value = "工费")
  private java.math.BigDecimal laborCosts;

  @ExcelProperty(value = "辅料")
  private java.math.BigDecimal accessoriesPrice;

  @ExcelProperty(value = "含税价格")
  private java.math.BigDecimal priceTax;

  @NumberFormat("0.0000")
  @ExcelProperty(value = "小计")
  private java.math.BigDecimal subtotal;

  @Size(max = 50, message = "备注长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "备注")
  private String remark;
}
